from django.conf.urls.static import static
from django.urls import path

from blog import views
from blog.Functional_modules.login import LoginView, CreateView
from blog.views import AboutcarView
from graduate import settings
from blog.Functional_modules import user_main ,login,handle
urlpatterns=[

    path('index/',views.index,name='index'),
    # path('login/',views.Login,name='login'),
    path('login/', LoginView.as_view(), name='login'),
    path('create/',CreateView.as_view(), name='create'),
    # 第一行用来转到填表单，第二行用来处理上传来的图片
    path('insertProductData/',user_main.insertProductData,name='insertProductData'),
    path('logout/', login.logout_view, name='logout'),
    path('user/',user_main.user_msg,name='user'),
    # path('handle/',handle.handle,name='handle'),
    path('head',login.head,name='head'),
    path('news/',views.news,name='news'),
    path('newcar/',views.newcar,name='newcar'),
    path('aboutcar/',AboutcarView.as_view(),name='aboutcar'),
    path('publicpraise/',views.publicpraise,name='publicpraise'),
    path('cardetail/',views.cardetail,name='cardetail')

]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)